package com.cq.hd.order.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.cq.hd.common.serialize.Decimal2Serializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class AdminPointsOrderPageVo implements Serializable {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "商家id")
    private Long businessId;

    @ApiModelProperty(value = "下单用户id")
    private Long userId;

    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "核销商户ID")
    private Long merchantId;

    @ApiModelProperty(value = "核销商户")
    private String merchantName;

    @ApiModelProperty(value = "商品名称")
    private String activeTitle;

    @ApiModelProperty(value = "活动图片")
    private String activeImg;

    @ApiModelProperty(value = "订单状态(1-待支付,2-待核销,3-核销中,4-已取消,5-已完成,6-已关闭)")
    private Integer orderState;

    @ApiModelProperty(value = "下单数量")
    private Integer orderNum;

    @ApiModelProperty(value = "商品金额")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal orderPrice;

    @ApiModelProperty(value = "支付积分")
    @JsonSerialize(using = Decimal2Serializer.class)
    private BigDecimal payPrice;

    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    @ApiModelProperty(value = "下单时间")
    private LocalDateTime orderTime;

    @ApiModelProperty(value = "下单人昵称")
    private String orderNickName;

    @ApiModelProperty(value = "下单人手机号")
    private String orderMobile;

    @ApiModelProperty(value = "所属商家名称")
    private String businessName;

    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;

    @JSONField(format="yyyy.MM.dd HH:mm:ss")
    @ApiModelProperty(value = "订单完成时间(核销时间)")
    private LocalDateTime finishTime;

    @ApiModelProperty(value = "子订单列表")
    private List<AdminOrderItemVo> adminOrderItems;
}
